<%-- 
    Document   : ListOrderFilter
    Created on : May 22, 2010, 1:56:24 PM
    Author     : vasi
--%>

<form action="<% out.print(request.getContextPath()+"/content/list"); %>" method="post">
    <select name="order_by">
        <option value="">--Order by--</option>
        <option value="created" <%if (request.getParameter("order_by") != null && request.getParameter("order_by").equals("created")) {out.print("selected=\"selected\""); }%>>Creation date</option>
        <option value="rating" <%if (request.getParameter("order_by") != null && request.getParameter("order_by").equals("rating")) {out.print("selected=\"selected\""); }%>>Rating</option>
        <option value="views" <%if (request.getParameter("order_by") != null && request.getParameter("order_by").equals("views")) {out.print("selected=\"selected\""); }%>>Views number</option>
    </select>
    <input type="radio" name="order_type" value="asc" <%if (request.getParameter("order_type") != null && request.getParameter("order_type").equals("asc")) {out.print("checked=\"checked\""); }%> />Asc
    <input type="radio" name="order_type" value="desc" <%if (request.getParameter("order_type") != null && request.getParameter("order_type").equals("desc")) {out.print("checked=\"checked\""); }%> />Desc
    <input type="submit" name="submit_filter" value="Submit" />
</form>